-- phpMyAdmin SQL Dump
-- version 4.0.4
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jul 27, 2013 at 07:52 PM
-- Server version: 5.5.21
-- PHP Version: 5.4.16

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `irgc`
--
CREATE DATABASE IF NOT EXISTS `irgc` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE `irgc`;

-- --------------------------------------------------------

--
-- Table structure for table `chat`
--

CREATE TABLE IF NOT EXISTS `chat` (
  `game_id` int(10) NOT NULL,
  `player_id` int(10) NOT NULL,
  `string` varchar(255) DEFAULT NULL,
  `time` datetime NOT NULL,
  KEY `FKchat385680` (`game_id`),
  KEY `FKchat391058` (`player_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `chat`
--

INSERT INTO `chat` (`game_id`, `player_id`, `string`, `time`) VALUES
(123, 123, '''asdadas''', '2013-07-27 18:26:40'),
(123, 123, 'salam chetore ?', '2013-07-27 18:27:07'),
(123, 123, 'salam chetore ?', '2013-07-27 18:35:15');

-- --------------------------------------------------------

--
-- Table structure for table `game`
--

CREATE TABLE IF NOT EXISTS `game` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `type` int(5) NOT NULL,
  `player1` int(10) NOT NULL,
  `player2` int(10) NOT NULL,
  `winner` int(5) NOT NULL DEFAULT '0',
  `time` time NOT NULL,
  `date` date NOT NULL,
  `gameStatus` int(1) NOT NULL DEFAULT '1',
  `sequence` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKgame800286` (`player1`),
  KEY `FKgame800285` (`player2`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=10 ;

--
-- Dumping data for table `game`
--

INSERT INTO `game` (`id`, `type`, `player1`, `player2`, `winner`, `time`, `date`, `gameStatus`, `sequence`) VALUES
(1, 1, 1, 2, 1, '04:45:00', '2013-07-09', 0, '1,5,2,7,6,4,8'),
(2, 1, 2, 1, 2, '03:55:00', '2013-07-08', 0, NULL),
(3, 1, 3, 4, 0, '01:14:00', '2013-07-09', 1, NULL),
(7, 1, 3, 2, 0, '02:23:05', '2013-07-18', 1, NULL),
(8, 1, 1, 4, 3, '15:43:25', '2013-07-15', 0, '1,5,7,2,4'),
(9, 1, 3, 1, 2, '03:45:42', '2013-07-09', 0, '1,2,3,4,7,5,6,8');

-- --------------------------------------------------------

--
-- Table structure for table `user`
--

CREATE TABLE IF NOT EXISTS `user` (
  `id` int(10) NOT NULL DEFAULT '0',
  `username` varchar(20) NOT NULL,
  `password` varchar(20) NOT NULL,
  `status` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `user`
--

INSERT INTO `user` (`id`, `username`, `password`, `status`) VALUES
(1, 'farshad', '123', 0),
(2, 'farhad', '123', 0),
(3, 'mojtaba', '123', 0),
(4, 'reza', '123', 0),
(5, 'localhost', '123', 0);

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
